package kind;

public class Test23 {
        public static void main(String[] args) {
            // 测试Dog类
            Dog1 dog1 = new Dog1();
            dog1.setName("大黑");
            dog1.setAge(5);
            dog1.play();
            System.out.println(dog1.getName());
            System.out.println(dog1.getAge());
            System.out.println("a的值是：" + dog1.a);
            dog1.test();

            // 测试Cat类
            Cat1 cat1 = new Cat1();
            cat1.setName("小白");
            cat1.setAge(1);
            System.out.println(cat1.getName());
            System.out.println(cat1.getAge());
            cat1.play();
        }
    }

